﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bes.Swsp.ToolBox;
using ESRI.ArcGIS.esriSystem;

namespace TestApp
{
  class Program
  {
    private static LicenseInitializer m_AOLicenseInitializer = new LicenseInitializer();

    static void Main(string[] args)
    {
      try
      {
        //ESRI License Initializer generated code.
        m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeAdvanced },
        new esriLicenseExtensionCode[] { esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst });

        GeoprocessingUtility.GetGeoprocessor(false, false, false);
        GeoprocessingUtility.ResetGeoprocessor();
      }
      catch (Exception ex)
      {
        Console.WriteLine(ex.GetType().FullName + ": " + ex.Message);
        Console.WriteLine(ex.StackTrace);
      }
      finally
      {
        Console.WriteLine("End Program");
        Console.ReadLine();
      }
    }
  }
}
